<?php
class Soul_Request_Http_Domain{
	
	private $_mainName = '';
	private $_subName = '';
	private $_baseUrl = '';
	private $_name = '';
	
	public function getName(){
		return $this->_name;
	}
	
	public function setName($value){
		$this->_name = $value;
		return $this;
	}
	
	public function getHostName(){
		if(empty($this->_subName)){
			return $this->getMainName();
		}
		return $this->getSubName().'.'.$this->getMainName();
	}
	
	public function getMainName(){
		return $this->_mainName;
	}
	
	public function setMainName($value){
		$this->_mainName = $value;
		return $this;
	}
	
	public function getSubName(){
		return $this->_subName;
	}
	
	public function setSubName($value){
		$this->_subName = $value;
		return $this;
	}
	
	public function getBaseUrl(){
		return $this->_baseUrl;
	}
	
	public function setBaseUrl($value){
		$this->_baseUrl = $value;
		return $this;
	}
}